package com.jctrip.hotel.source.model.atour.req;

import java.io.Serializable;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;


import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author: beihai
 * @Date: 2022/8/11 17:30
 * @Description:
 */
@Data
@Builder
public class CreateOrderReq implements Serializable {
    @NotNull
    private Integer appId;

    @NotNull
    private Integer hotelId;

    @NotNull
    private Integer roomTypeId;

    @NotNull
    private Integer roomNum;

    @NotNull
    private Integer roomRateTypeId;

    /**
     * [{
     * "accDate": "2017-11-01",
     * "roomRate": 350
     * }, {
     * "accDate": "2017-11-02",
     * "roomRate": 350
     * }]
     */
    @NotBlank
    private String roomRateList;

    /**
     * 入住日期 格式 yyyy-MM-dd
     */
    @NotBlank
    private String arrival;

    /**
     * 订单保留时间 （0-23整数）
     */
    private Integer assureTime;

    /**
     * 离店日期 格式 yyyy-MM-dd
     */
    @NotBlank
    private String departure;

    @NotBlank
    private String mobile;

    @NotBlank
    private String contactName;

    /**
     * 入住人 多个入住人用,号隔开
     */
    @NotBlank
    private String guestName;

    @NotNull
    private Integer source;

    @NotNull
    private Integer subSource;

    @NotBlank
    private String thirdOrderNo;

    /**
     * 使用的券列表
     * [{
     * "couponsType": 40,
     * "couponsNum": 2
     * },
     * {
     * "couponsType": 41,
     * "couponsNum": 1
     * }
     * ]
     */
    private String couponsList;

    private String remark;

    @NotNull
    private Integer mebId;

    private String sign;

    private Long timestamp;

    @NoArgsConstructor
    @Data
    public static class RoomRate {
        @JsonProperty("accDate")
        private String accDate;
        @JsonProperty("roomRate")
        private Double roomRate;
    }

    @NoArgsConstructor
    @Data
    public static class CouponsDTO {
        @JsonProperty("couponsType")
        private Integer couponsType;
        @JsonProperty("couponsNum")
        private Integer couponsNum;
    }
}
